import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('token', () => {
  let userInfo = ref([])
  let username = localStorage.getItem('username')
  let token = localStorage.getItem('token')
  userInfo.value.push({
    username: username,
    token: token,
    email: '2594309472@qq.com',
    addresss: '北京市昌平区'
  })
  return { userInfo }
},

  {
    // 持久化
    persist: true,
  },)
